//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS ServiceDiscovery service.
///
/// Cloud Map With Cloud Map, you can configure public DNS, private DNS, or HTTP namespaces that your microservice applications run in. When an instance becomes available, you can call the Cloud Map API to register the instance with Cloud Map. For public or private DNS namespaces, Cloud Map automatically creates DNS records and an optional health check. Clients that submit public or private DNS queries, or HTTP requests, for the service receive an answer that contains up to eight healthy records.
public struct ServiceDiscovery: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the ServiceDiscovery client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            amzTarget: "Route53AutoNaming_v20170314",
            serviceName: "ServiceDiscovery",
            serviceIdentifier: "servicediscovery",
            serviceProtocol: .json(version: "1.1"),
            apiVersion: "2017-03-14",
            endpoint: endpoint,
            variantEndpoints: Self.variantEndpoints,
            errorType: ServiceDiscoveryErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }




    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.dualstack]: .init(endpoints: [
            "af-south-1": "servicediscovery.af-south-1.api.aws",
            "ap-east-1": "servicediscovery.ap-east-1.api.aws",
            "ap-northeast-1": "servicediscovery.ap-northeast-1.api.aws",
            "ap-northeast-2": "servicediscovery.ap-northeast-2.api.aws",
            "ap-northeast-3": "servicediscovery.ap-northeast-3.api.aws",
            "ap-south-1": "servicediscovery.ap-south-1.api.aws",
            "ap-south-2": "servicediscovery.ap-south-2.api.aws",
            "ap-southeast-1": "servicediscovery.ap-southeast-1.api.aws",
            "ap-southeast-2": "servicediscovery.ap-southeast-2.api.aws",
            "ap-southeast-3": "servicediscovery.ap-southeast-3.api.aws",
            "ap-southeast-4": "servicediscovery.ap-southeast-4.api.aws",
            "ap-southeast-5": "servicediscovery.ap-southeast-5.api.aws",
            "ap-southeast-7": "servicediscovery.ap-southeast-7.api.aws",
            "ca-central-1": "servicediscovery.ca-central-1.api.aws",
            "ca-west-1": "servicediscovery.ca-west-1.api.aws",
            "cn-north-1": "servicediscovery.cn-north-1.api.amazonwebservices.com.cn",
            "cn-northwest-1": "servicediscovery.cn-northwest-1.api.amazonwebservices.com.cn",
            "eu-central-1": "servicediscovery.eu-central-1.api.aws",
            "eu-central-2": "servicediscovery.eu-central-2.api.aws",
            "eu-north-1": "servicediscovery.eu-north-1.api.aws",
            "eu-south-1": "servicediscovery.eu-south-1.api.aws",
            "eu-south-2": "servicediscovery.eu-south-2.api.aws",
            "eu-west-1": "servicediscovery.eu-west-1.api.aws",
            "eu-west-2": "servicediscovery.eu-west-2.api.aws",
            "eu-west-3": "servicediscovery.eu-west-3.api.aws",
            "il-central-1": "servicediscovery.il-central-1.api.aws",
            "me-central-1": "servicediscovery.me-central-1.api.aws",
            "me-south-1": "servicediscovery.me-south-1.api.aws",
            "mx-central-1": "servicediscovery.mx-central-1.api.aws",
            "sa-east-1": "servicediscovery.sa-east-1.api.aws",
            "us-east-1": "servicediscovery.us-east-1.api.aws",
            "us-east-2": "servicediscovery.us-east-2.api.aws",
            "us-gov-east-1": "servicediscovery.us-gov-east-1.api.aws",
            "us-gov-west-1": "servicediscovery.us-gov-west-1.api.aws",
            "us-west-1": "servicediscovery.us-west-1.api.aws",
            "us-west-2": "servicediscovery.us-west-2.api.aws"
        ]),
        [.dualstack, .fips]: .init(endpoints: [
            "ca-central-1": "servicediscovery-fips.ca-central-1.api.aws",
            "ca-west-1": "servicediscovery-fips.ca-west-1.api.aws",
            "us-east-1": "servicediscovery-fips.us-east-1.api.aws",
            "us-east-2": "servicediscovery-fips.us-east-2.api.aws",
            "us-gov-east-1": "servicediscovery-fips.us-gov-east-1.api.aws",
            "us-gov-west-1": "servicediscovery-fips.us-gov-west-1.api.aws",
            "us-west-1": "servicediscovery-fips.us-west-1.api.aws",
            "us-west-2": "servicediscovery-fips.us-west-2.api.aws"
        ]),
        [.fips]: .init(endpoints: [
            "ca-central-1": "servicediscovery-fips.ca-central-1.amazonaws.com",
            "ca-west-1": "servicediscovery-fips.ca-west-1.amazonaws.com",
            "us-east-1": "servicediscovery-fips.us-east-1.amazonaws.com",
            "us-east-2": "servicediscovery-fips.us-east-2.amazonaws.com",
            "us-gov-east-1": "servicediscovery-fips.us-gov-east-1.amazonaws.com",
            "us-gov-west-1": "servicediscovery-fips.us-gov-west-1.amazonaws.com",
            "us-west-1": "servicediscovery-fips.us-west-1.amazonaws.com",
            "us-west-2": "servicediscovery-fips.us-west-2.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Creates an HTTP namespace. Service instances registered using an HTTP namespace can be discovered using a DiscoverInstances request but can't be discovered using DNS. For the current quota on the number of namespaces that you can create using the same Amazon Web Services account, see Cloud Map quotas in the Cloud Map Developer Guide.
    @Sendable
    @inlinable
    public func createHttpNamespace(_ input: CreateHttpNamespaceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateHttpNamespaceResponse {
        try await self.client.execute(
            operation: "CreateHttpNamespace", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates an HTTP namespace. Service instances registered using an HTTP namespace can be discovered using a DiscoverInstances request but can't be discovered using DNS. For the current quota on the number of namespaces that you can create using the same Amazon Web Services account, see Cloud Map quotas in the Cloud Map Developer Guide.
    ///
    /// Parameters:
    ///   - creatorRequestId: A unique string that identifies the request and that allows failed CreateHttpNamespace requests to be retried without the risk of running the operation twice. CreatorRequestId can be any unique string (for example, a date/time stamp).
    ///   - description: A description for the namespace.
    ///   - name: The name that you want to assign to this namespace.
    ///   - tags: The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.
    ///   - logger: Logger use during operation
    @inlinable
    public func createHttpNamespace(
        creatorRequestId: String? = CreateHttpNamespaceRequest.idempotencyToken(),
        description: String? = nil,
        name: String,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateHttpNamespaceResponse {
        let input = CreateHttpNamespaceRequest(
            creatorRequestId: creatorRequestId, 
            description: description, 
            name: name, 
            tags: tags
        )
        return try await self.createHttpNamespace(input, logger: logger)
    }

    /// Creates a private namespace based on DNS, which is visible only inside a specified Amazon VPC. The namespace defines your service naming scheme. For example, if you name your namespace example.com and name your service backend, the resulting DNS name for the service is backend.example.com. Service instances that are registered using a private DNS namespace can be discovered using either a DiscoverInstances request or using DNS. For the current quota on the number of namespaces that you can create using the same Amazon Web Services account, see Cloud Map quotas in the Cloud Map Developer Guide.
    @Sendable
    @inlinable
    public func createPrivateDnsNamespace(_ input: CreatePrivateDnsNamespaceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreatePrivateDnsNamespaceResponse {
        try await self.client.execute(
            operation: "CreatePrivateDnsNamespace", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a private namespace based on DNS, which is visible only inside a specified Amazon VPC. The namespace defines your service naming scheme. For example, if you name your namespace example.com and name your service backend, the resulting DNS name for the service is backend.example.com. Service instances that are registered using a private DNS namespace can be discovered using either a DiscoverInstances request or using DNS. For the current quota on the number of namespaces that you can create using the same Amazon Web Services account, see Cloud Map quotas in the Cloud Map Developer Guide.
    ///
    /// Parameters:
    ///   - creatorRequestId: A unique string that identifies the request and that allows failed CreatePrivateDnsNamespace requests to be retried without the risk of running the operation twice. CreatorRequestId can be any unique string (for example, a date/timestamp).
    ///   - description: A description for the namespace.
    ///   - name: The name that you want to assign to this namespace. When you create a private DNS namespace, Cloud Map automatically creates an Amazon Route 53 private hosted zone that has the same name as the namespace.
    ///   - properties: Properties for the private DNS namespace.
    ///   - tags: The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.
    ///   - vpc: The ID of the Amazon VPC that you want to associate the namespace with.
    ///   - logger: Logger use during operation
    @inlinable
    public func createPrivateDnsNamespace(
        creatorRequestId: String? = CreatePrivateDnsNamespaceRequest.idempotencyToken(),
        description: String? = nil,
        name: String,
        properties: PrivateDnsNamespaceProperties? = nil,
        tags: [Tag]? = nil,
        vpc: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreatePrivateDnsNamespaceResponse {
        let input = CreatePrivateDnsNamespaceRequest(
            creatorRequestId: creatorRequestId, 
            description: description, 
            name: name, 
            properties: properties, 
            tags: tags, 
            vpc: vpc
        )
        return try await self.createPrivateDnsNamespace(input, logger: logger)
    }

    /// Creates a public namespace based on DNS, which is visible on the internet. The namespace defines your service naming scheme. For example, if you name your namespace example.com and name your service backend, the resulting DNS name for the service is backend.example.com. You can discover instances that were registered with a public DNS namespace by using either a DiscoverInstances request or using DNS. For the current quota on the number of namespaces that you can create using the same Amazon Web Services account, see Cloud Map quotas in the Cloud Map Developer Guide.  The CreatePublicDnsNamespace API operation is not supported in the Amazon Web Services GovCloud (US) Regions.
    @Sendable
    @inlinable
    public func createPublicDnsNamespace(_ input: CreatePublicDnsNamespaceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreatePublicDnsNamespaceResponse {
        try await self.client.execute(
            operation: "CreatePublicDnsNamespace", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a public namespace based on DNS, which is visible on the internet. The namespace defines your service naming scheme. For example, if you name your namespace example.com and name your service backend, the resulting DNS name for the service is backend.example.com. You can discover instances that were registered with a public DNS namespace by using either a DiscoverInstances request or using DNS. For the current quota on the number of namespaces that you can create using the same Amazon Web Services account, see Cloud Map quotas in the Cloud Map Developer Guide.  The CreatePublicDnsNamespace API operation is not supported in the Amazon Web Services GovCloud (US) Regions.
    ///
    /// Parameters:
    ///   - creatorRequestId: A unique string that identifies the request and that allows failed CreatePublicDnsNamespace requests to be retried without the risk of running the operation twice. CreatorRequestId can be any unique string (for example, a date/timestamp).
    ///   - description: A description for the namespace.
    ///   - name: The name that you want to assign to this namespace.  Do not include sensitive information in the name. The name is publicly available using DNS queries.
    ///   - properties: Properties for the public DNS namespace.
    ///   - tags: The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.
    ///   - logger: Logger use during operation
    @inlinable
    public func createPublicDnsNamespace(
        creatorRequestId: String? = CreatePublicDnsNamespaceRequest.idempotencyToken(),
        description: String? = nil,
        name: String,
        properties: PublicDnsNamespaceProperties? = nil,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreatePublicDnsNamespaceResponse {
        let input = CreatePublicDnsNamespaceRequest(
            creatorRequestId: creatorRequestId, 
            description: description, 
            name: name, 
            properties: properties, 
            tags: tags
        )
        return try await self.createPublicDnsNamespace(input, logger: logger)
    }

    /// Creates a service. This action defines the configuration for the following entities:   For public and private DNS namespaces, one of the following combinations of DNS records in Amazon Route 53:    A     AAAA     A and AAAA     SRV     CNAME      Optionally, a health check   After you create the service, you can submit a RegisterInstance request, and Cloud Map uses the values in the configuration to create the specified entities. For the current quota on the number of instances that you can register using the same namespace and using the same service, see Cloud Map quotas in the Cloud Map Developer Guide.
    @Sendable
    @inlinable
    public func createService(_ input: CreateServiceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateServiceResponse {
        try await self.client.execute(
            operation: "CreateService", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a service. This action defines the configuration for the following entities:   For public and private DNS namespaces, one of the following combinations of DNS records in Amazon Route 53:    A     AAAA     A and AAAA     SRV     CNAME      Optionally, a health check   After you create the service, you can submit a RegisterInstance request, and Cloud Map uses the values in the configuration to create the specified entities. For the current quota on the number of instances that you can register using the same namespace and using the same service, see Cloud Map quotas in the Cloud Map Developer Guide.
    ///
    /// Parameters:
    ///   - creatorRequestId: A unique string that identifies the request and that allows failed CreateService requests to be retried without the risk of running the operation twice. CreatorRequestId can be any unique string (for example, a date/timestamp).
    ///   - description: A description for the service.
    ///   - dnsConfig: A complex type that contains information about the Amazon Route 53 records that you want Cloud Map to create when you register an instance.
    ///   - healthCheckConfig:  Public DNS and HTTP namespaces only. A complex type that contains settings for an optional Route 53 health check. If you specify settings for a health check, Cloud Map associates the health check with all the Route 53 DNS records that you specify in DnsConfig.  If you specify a health check configuration, you can specify either HealthCheckCustomConfig or HealthCheckConfig but not both.  For information about the charges for health checks, see Cloud Map Pricing.
    ///   - healthCheckCustomConfig: A complex type that contains information about an optional custom health check.  If you specify a health check configuration, you can specify either HealthCheckCustomConfig or HealthCheckConfig but not both.  You can't add, update, or delete a HealthCheckCustomConfig configuration from an existing service.
    ///   - name: The name that you want to assign to the service.  Do not include sensitive information in the name if the namespace is discoverable by public DNS queries.  If you want Cloud Map to create an SRV record when you register an instance and you're using a system that requires a specific SRV format, such as HAProxy, specify the following for Name:   Start the name with an underscore (_), such as _exampleservice.   End the name with ._protocol, such as ._tcp.   When you register an instance, Cloud Map creates an SRV record and assigns a name to the record by concatenating the service name and the namespace name (for example,  _exampleservice._tcp.example.com).  For services that are accessible by DNS queries, you can't create multiple services with names that differ only by case (such as EXAMPLE and example). Otherwise, these services have the same DNS name and can't be distinguished. However, if you use a namespace that's only accessible by API calls, then you can create services that with names that differ only by case.
    ///   - namespaceId: The ID or Amazon Resource Name (ARN) of the namespace that you want to use to create the service. For namespaces shared with your Amazon Web Services account, specify the namespace ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.
    ///   - tags: The tags to add to the service. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.
    ///   - type: If present, specifies that the service instances are only discoverable using the DiscoverInstances API operation. No DNS records is registered for the service instances. The only valid value is HTTP.
    ///   - logger: Logger use during operation
    @inlinable
    public func createService(
        creatorRequestId: String? = CreateServiceRequest.idempotencyToken(),
        description: String? = nil,
        dnsConfig: DnsConfig? = nil,
        healthCheckConfig: HealthCheckConfig? = nil,
        healthCheckCustomConfig: HealthCheckCustomConfig? = nil,
        name: String,
        namespaceId: String? = nil,
        tags: [Tag]? = nil,
        type: ServiceTypeOption? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateServiceResponse {
        let input = CreateServiceRequest(
            creatorRequestId: creatorRequestId, 
            description: description, 
            dnsConfig: dnsConfig, 
            healthCheckConfig: healthCheckConfig, 
            healthCheckCustomConfig: healthCheckCustomConfig, 
            name: name, 
            namespaceId: namespaceId, 
            tags: tags, 
            type: type
        )
        return try await self.createService(input, logger: logger)
    }

    /// Deletes a namespace from the current account. If the namespace still contains one or more services, the request fails.
    @Sendable
    @inlinable
    public func deleteNamespace(_ input: DeleteNamespaceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteNamespaceResponse {
        try await self.client.execute(
            operation: "DeleteNamespace", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a namespace from the current account. If the namespace still contains one or more services, the request fails.
    ///
    /// Parameters:
    ///   - id: The ID or Amazon Resource Name (ARN) of the namespace that you want to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteNamespace(
        id: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteNamespaceResponse {
        let input = DeleteNamespaceRequest(
            id: id
        )
        return try await self.deleteNamespace(input, logger: logger)
    }

    /// Deletes a specified service and all associated service attributes. If the service still contains one or more registered instances, the request fails.
    @Sendable
    @inlinable
    public func deleteService(_ input: DeleteServiceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteServiceResponse {
        try await self.client.execute(
            operation: "DeleteService", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a specified service and all associated service attributes. If the service still contains one or more registered instances, the request fails.
    ///
    /// Parameters:
    ///   - id: The ID or Amazon Resource Name (ARN) of the service that you want to delete. If the namespace associated with the service is shared with your Amazon Web Services account, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteService(
        id: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteServiceResponse {
        let input = DeleteServiceRequest(
            id: id
        )
        return try await self.deleteService(input, logger: logger)
    }

    /// Deletes specific attributes associated with a service.
    @Sendable
    @inlinable
    public func deleteServiceAttributes(_ input: DeleteServiceAttributesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteServiceAttributesResponse {
        try await self.client.execute(
            operation: "DeleteServiceAttributes", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes specific attributes associated with a service.
    ///
    /// Parameters:
    ///   - attributes: A list of keys corresponding to each attribute that you want to delete.
    ///   - serviceId: The ID or Amazon Resource Name (ARN) of the service from which the attributes will be deleted. For services created in a namespace shared with your Amazon Web Services account, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteServiceAttributes(
        attributes: [String],
        serviceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteServiceAttributesResponse {
        let input = DeleteServiceAttributesRequest(
            attributes: attributes, 
            serviceId: serviceId
        )
        return try await self.deleteServiceAttributes(input, logger: logger)
    }

    /// Deletes the Amazon Route 53 DNS records and health check, if any, that Cloud Map created for the specified instance.
    @Sendable
    @inlinable
    public func deregisterInstance(_ input: DeregisterInstanceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeregisterInstanceResponse {
        try await self.client.execute(
            operation: "DeregisterInstance", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the Amazon Route 53 DNS records and health check, if any, that Cloud Map created for the specified instance.
    ///
    /// Parameters:
    ///   - instanceId: The value that you specified for Id in the RegisterInstance request.
    ///   - serviceId: The ID or Amazon Resource Name (ARN) of the service that the instance is associated with. If the namespace associated with the service is shared with your account, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.
    ///   - logger: Logger use during operation
    @inlinable
    public func deregisterInstance(
        instanceId: String,
        serviceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeregisterInstanceResponse {
        let input = DeregisterInstanceRequest(
            instanceId: instanceId, 
            serviceId: serviceId
        )
        return try await self.deregisterInstance(input, logger: logger)
    }

    /// Discovers registered instances for a specified namespace and service. You can use DiscoverInstances to discover instances for any type of namespace. DiscoverInstances returns a randomized list of instances allowing customers to distribute traffic evenly across instances. For public and private DNS namespaces, you can also use DNS queries to discover instances.
    @Sendable
    @inlinable
    public func discoverInstances(_ input: DiscoverInstancesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DiscoverInstancesResponse {
        try await self.client.execute(
            operation: "DiscoverInstances", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            hostPrefix: "data-", 
            logger: logger
        )
    }
    /// Discovers registered instances for a specified namespace and service. You can use DiscoverInstances to discover instances for any type of namespace. DiscoverInstances returns a randomized list of instances allowing customers to distribute traffic evenly across instances. For public and private DNS namespaces, you can also use DNS queries to discover instances.
    ///
    /// Parameters:
    ///   - healthStatus: The health status of the instances that you want to discover. This parameter is ignored for services that don't have a health check configured, and all instances are returned.  HEALTHY  Returns healthy instances.  UNHEALTHY  Returns unhealthy instances.  ALL  Returns all instances.  HEALTHY_OR_ELSE_ALL  Returns healthy instances, unless none are reporting a healthy state. In that case, return all instances. This is also called failing open.
    ///   - maxResults: The maximum number of instances that you want Cloud Map to return in the response to a DiscoverInstances request. If you don't specify a value for MaxResults, Cloud Map returns up to 100 instances.
    ///   - namespaceName: The HttpName name of the namespace. The HttpName is found in the HttpProperties member of the Properties member of the namespace. In most cases, Name and HttpName match. However, if you reuse Name for namespace creation, a generated hash is added to HttpName to distinguish the two.
    ///   - optionalParameters: Opportunistic filters to scope the results based on custom attributes. If there are instances that match both the filters specified in both the QueryParameters parameter and this parameter, all of these instances are returned. Otherwise, the filters are ignored, and only instances that match the filters that are specified in the QueryParameters parameter are returned.
    ///   - ownerAccount: The ID of the Amazon Web Services account that owns the namespace associated with the instance, as specified in the namespace ResourceOwner field. For instances associated with namespaces that are shared with your account, you must specify an OwnerAccount.
    ///   - queryParameters: Filters to scope the results based on custom attributes for the instance (for example, {version=v1, az=1a}). Only instances that match all the specified key-value pairs are returned.
    ///   - serviceName: The name of the service that you specified when you registered the instance.
    ///   - logger: Logger use during operation
    @inlinable
    public func discoverInstances(
        healthStatus: HealthStatusFilter? = nil,
        maxResults: Int? = nil,
        namespaceName: String,
        optionalParameters: [String: String]? = nil,
        ownerAccount: String? = nil,
        queryParameters: [String: String]? = nil,
        serviceName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DiscoverInstancesResponse {
        let input = DiscoverInstancesRequest(
            healthStatus: healthStatus, 
            maxResults: maxResults, 
            namespaceName: namespaceName, 
            optionalParameters: optionalParameters, 
            ownerAccount: ownerAccount, 
            queryParameters: queryParameters, 
            serviceName: serviceName
        )
        return try await self.discoverInstances(input, logger: logger)
    }

    /// Discovers the increasing revision associated with an instance.
    @Sendable
    @inlinable
    public func discoverInstancesRevision(_ input: DiscoverInstancesRevisionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DiscoverInstancesRevisionResponse {
        try await self.client.execute(
            operation: "DiscoverInstancesRevision", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            hostPrefix: "data-", 
            logger: logger
        )
    }
    /// Discovers the increasing revision associated with an instance.
    ///
    /// Parameters:
    ///   - namespaceName: The HttpName name of the namespace. The HttpName is found in the HttpProperties member of the Properties member of the namespace.
    ///   - ownerAccount: The ID of the Amazon Web Services account that owns the namespace associated with the instance, as specified in the namespace ResourceOwner field. For instances associated with namespaces that are shared with your account, you must specify an OwnerAccount. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.
    ///   - serviceName: The name of the service that you specified when you registered the instance.
    ///   - logger: Logger use during operation
    @inlinable
    public func discoverInstancesRevision(
        namespaceName: String,
        ownerAccount: String? = nil,
        serviceName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DiscoverInstancesRevisionResponse {
        let input = DiscoverInstancesRevisionRequest(
            namespaceName: namespaceName, 
            ownerAccount: ownerAccount, 
            serviceName: serviceName
        )
        return try await self.discoverInstancesRevision(input, logger: logger)
    }

    /// Gets information about a specified instance.
    @Sendable
    @inlinable
    public func getInstance(_ input: GetInstanceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetInstanceResponse {
        try await self.client.execute(
            operation: "GetInstance", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets information about a specified instance.
    ///
    /// Parameters:
    ///   - instanceId: The ID of the instance that you want to get information about.
    ///   - serviceId: The ID or Amazon Resource Name (ARN) of the service that the instance is associated with. For services created in a shared namespace, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.
    ///   - logger: Logger use during operation
    @inlinable
    public func getInstance(
        instanceId: String,
        serviceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetInstanceResponse {
        let input = GetInstanceRequest(
            instanceId: instanceId, 
            serviceId: serviceId
        )
        return try await self.getInstance(input, logger: logger)
    }

    /// Gets the current health status (Healthy, Unhealthy, or Unknown) of one or more instances that are associated with a specified service.  There's a brief delay between when you register an instance and when the health status for the instance is available.
    @Sendable
    @inlinable
    public func getInstancesHealthStatus(_ input: GetInstancesHealthStatusRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetInstancesHealthStatusResponse {
        try await self.client.execute(
            operation: "GetInstancesHealthStatus", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets the current health status (Healthy, Unhealthy, or Unknown) of one or more instances that are associated with a specified service.  There's a brief delay between when you register an instance and when the health status for the instance is available.
    ///
    /// Parameters:
    ///   - instances: An array that contains the IDs of all the instances that you want to get the health status for. If you omit Instances, Cloud Map returns the health status for all the instances that are associated with the specified service.  To get the IDs for the instances that you've registered by using a specified service, submit a ListInstances request.
    ///   - maxResults: The maximum number of instances that you want Cloud Map to return in the response to a GetInstancesHealthStatus request. If you don't specify a value for MaxResults, Cloud Map returns up to 100 instances.
    ///   - nextToken: For the first GetInstancesHealthStatus request, omit this value. If more than MaxResults instances match the specified criteria, you can submit another GetInstancesHealthStatus request to get the next group of results. Specify the value of NextToken from the previous response in the next request.
    ///   - serviceId: The ID or Amazon Resource Name (ARN) of the service that the instance is associated with. For services created in a shared namespace, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.
    ///   - logger: Logger use during operation
    @inlinable
    public func getInstancesHealthStatus(
        instances: [String]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        serviceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetInstancesHealthStatusResponse {
        let input = GetInstancesHealthStatusRequest(
            instances: instances, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            serviceId: serviceId
        )
        return try await self.getInstancesHealthStatus(input, logger: logger)
    }

    /// Gets information about a namespace.
    @Sendable
    @inlinable
    public func getNamespace(_ input: GetNamespaceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetNamespaceResponse {
        try await self.client.execute(
            operation: "GetNamespace", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets information about a namespace.
    ///
    /// Parameters:
    ///   - id: The ID or Amazon Resource Name (ARN) of the namespace that you want to get information about. For namespaces shared with your Amazon Web Services account, specify the namespace ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide
    ///   - logger: Logger use during operation
    @inlinable
    public func getNamespace(
        id: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetNamespaceResponse {
        let input = GetNamespaceRequest(
            id: id
        )
        return try await self.getNamespace(input, logger: logger)
    }

    /// Gets information about any operation that returns an operation ID in the response, such as a CreateHttpNamespace request.  To get a list of operations that match specified criteria, see ListOperations.
    @Sendable
    @inlinable
    public func getOperation(_ input: GetOperationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetOperationResponse {
        try await self.client.execute(
            operation: "GetOperation", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets information about any operation that returns an operation ID in the response, such as a CreateHttpNamespace request.  To get a list of operations that match specified criteria, see ListOperations.
    ///
    /// Parameters:
    ///   - operationId: The ID of the operation that you want to get more information about.
    ///   - ownerAccount: The ID of the Amazon Web Services account that owns the namespace associated with the operation, as specified in the namespace ResourceOwner field. For operations associated with namespaces that are shared with your account, you must specify an OwnerAccount.
    ///   - logger: Logger use during operation
    @inlinable
    public func getOperation(
        operationId: String,
        ownerAccount: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetOperationResponse {
        let input = GetOperationRequest(
            operationId: operationId, 
            ownerAccount: ownerAccount
        )
        return try await self.getOperation(input, logger: logger)
    }

    /// Gets the settings for a specified service.
    @Sendable
    @inlinable
    public func getService(_ input: GetServiceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetServiceResponse {
        try await self.client.execute(
            operation: "GetService", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets the settings for a specified service.
    ///
    /// Parameters:
    ///   - id: The ID or Amazon Resource Name (ARN) of the service that you want to get settings for. For services created by consumers in a shared namespace, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.
    ///   - logger: Logger use during operation
    @inlinable
    public func getService(
        id: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetServiceResponse {
        let input = GetServiceRequest(
            id: id
        )
        return try await self.getService(input, logger: logger)
    }

    /// Returns the attributes associated with a specified service.
    @Sendable
    @inlinable
    public func getServiceAttributes(_ input: GetServiceAttributesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetServiceAttributesResponse {
        try await self.client.execute(
            operation: "GetServiceAttributes", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the attributes associated with a specified service.
    ///
    /// Parameters:
    ///   - serviceId: The ID or Amazon Resource Name (ARN) of the service that you want to get attributes for. For services created in a namespace shared with your Amazon Web Services account, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.
    ///   - logger: Logger use during operation
    @inlinable
    public func getServiceAttributes(
        serviceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetServiceAttributesResponse {
        let input = GetServiceAttributesRequest(
            serviceId: serviceId
        )
        return try await self.getServiceAttributes(input, logger: logger)
    }

    /// Lists summary information about the instances that you registered by using a specified service.
    @Sendable
    @inlinable
    public func listInstances(_ input: ListInstancesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListInstancesResponse {
        try await self.client.execute(
            operation: "ListInstances", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists summary information about the instances that you registered by using a specified service.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of instances that you want Cloud Map to return in the response to a ListInstances request. If you don't specify a value for MaxResults, Cloud Map returns up to 100 instances.
    ///   - nextToken: For the first ListInstances request, omit this value. If more than MaxResults instances match the specified criteria, you can submit another ListInstances request to get the next group of results. Specify the value of NextToken from the previous response in the next request.
    ///   - serviceId: The ID or Amazon Resource Name (ARN) of the service that you want to list instances for. For services created in a shared namespace, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.
    ///   - logger: Logger use during operation
    @inlinable
    public func listInstances(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        serviceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListInstancesResponse {
        let input = ListInstancesRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            serviceId: serviceId
        )
        return try await self.listInstances(input, logger: logger)
    }

    /// Lists summary information about the namespaces that were created by the current Amazon Web Services account and shared with the current Amazon Web Services account.
    @Sendable
    @inlinable
    public func listNamespaces(_ input: ListNamespacesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListNamespacesResponse {
        try await self.client.execute(
            operation: "ListNamespaces", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists summary information about the namespaces that were created by the current Amazon Web Services account and shared with the current Amazon Web Services account.
    ///
    /// Parameters:
    ///   - filters: A complex type that contains specifications for the namespaces that you want to list. If you specify more than one filter, a namespace must match all filters to be returned by ListNamespaces.
    ///   - maxResults: The maximum number of namespaces that you want Cloud Map to return in the response to a ListNamespaces request. If you don't specify a value for MaxResults, Cloud Map returns up to 100 namespaces.
    ///   - nextToken: For the first ListNamespaces request, omit this value. If the response contains NextToken, submit another ListNamespaces request to get the next group of results. Specify the value of NextToken from the previous response in the next request.  Cloud Map gets MaxResults namespaces and then filters them based on the specified criteria. It's possible that no namespaces in the first MaxResults namespaces matched the specified criteria but that subsequent groups of MaxResults namespaces do contain namespaces that match the criteria.
    ///   - logger: Logger use during operation
    @inlinable
    public func listNamespaces(
        filters: [NamespaceFilter]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListNamespacesResponse {
        let input = ListNamespacesRequest(
            filters: filters, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listNamespaces(input, logger: logger)
    }

    /// Lists operations that match the criteria that you specify.
    @Sendable
    @inlinable
    public func listOperations(_ input: ListOperationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListOperationsResponse {
        try await self.client.execute(
            operation: "ListOperations", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists operations that match the criteria that you specify.
    ///
    /// Parameters:
    ///   - filters: A complex type that contains specifications for the operations that you want to list, for example, operations that you started between a specified start date and end date. If you specify more than one filter, an operation must match all filters to be returned by ListOperations.
    ///   - maxResults: The maximum number of items that you want Cloud Map to return in the response to a ListOperations request. If you don't specify a value for MaxResults, Cloud Map returns up to 100 operations.
    ///   - nextToken: For the first ListOperations request, omit this value. If the response contains NextToken, submit another ListOperations request to get the next group of results. Specify the value of NextToken from the previous response in the next request.  Cloud Map gets MaxResults operations and then filters them based on the specified criteria. It's possible that no operations in the first MaxResults operations matched the specified criteria but that subsequent groups of MaxResults operations do contain operations that match the criteria.
    ///   - logger: Logger use during operation
    @inlinable
    public func listOperations(
        filters: [OperationFilter]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListOperationsResponse {
        let input = ListOperationsRequest(
            filters: filters, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listOperations(input, logger: logger)
    }

    /// Lists summary information for all the services that are associated with one or more namespaces.
    @Sendable
    @inlinable
    public func listServices(_ input: ListServicesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListServicesResponse {
        try await self.client.execute(
            operation: "ListServices", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists summary information for all the services that are associated with one or more namespaces.
    ///
    /// Parameters:
    ///   - filters: A complex type that contains specifications for the namespaces that you want to list services for.  If you specify more than one filter, an operation must match all filters to be returned by ListServices.
    ///   - maxResults: The maximum number of services that you want Cloud Map to return in the response to a ListServices request. If you don't specify a value for MaxResults, Cloud Map returns up to 100 services.
    ///   - nextToken: For the first ListServices request, omit this value. If the response contains NextToken, submit another ListServices request to get the next group of results. Specify the value of NextToken from the previous response in the next request.  Cloud Map gets MaxResults services and then filters them based on the specified criteria. It's possible that no services in the first MaxResults services matched the specified criteria but that subsequent groups of MaxResults services do contain services that match the criteria.
    ///   - logger: Logger use during operation
    @inlinable
    public func listServices(
        filters: [ServiceFilter]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListServicesResponse {
        let input = ListServicesRequest(
            filters: filters, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listServices(input, logger: logger)
    }

    /// Lists tags for the specified resource.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists tags for the specified resource.
    ///
    /// Parameters:
    ///   - resourceARN: The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceARN: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceARN: resourceARN
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Creates or updates one or more records and, optionally, creates a health check based on the settings in a specified service. When you submit a RegisterInstance request, the following occurs:   For each DNS record that you define in the service that's specified by ServiceId, a record is created or updated in the hosted zone that's associated with the corresponding namespace.   If the service includes HealthCheckConfig, a health check is created based on the settings in the health check configuration.   The health check, if any, is associated with each of the new or updated records.    One RegisterInstance request must complete before you can submit another request and specify the same service ID and instance ID.  For more information, see CreateService. When Cloud Map receives a DNS query for the specified DNS name, it returns the applicable value:    If the health check is healthy: returns all the records    If the health check is unhealthy: returns the applicable value for the last healthy instance    If you didn't specify a health check configuration: returns all the records   For the current quota on the number of instances that you can register using the same namespace and using the same service, see Cloud Map quotas in the Cloud Map Developer Guide.
    @Sendable
    @inlinable
    public func registerInstance(_ input: RegisterInstanceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> RegisterInstanceResponse {
        try await self.client.execute(
            operation: "RegisterInstance", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates or updates one or more records and, optionally, creates a health check based on the settings in a specified service. When you submit a RegisterInstance request, the following occurs:   For each DNS record that you define in the service that's specified by ServiceId, a record is created or updated in the hosted zone that's associated with the corresponding namespace.   If the service includes HealthCheckConfig, a health check is created based on the settings in the health check configuration.   The health check, if any, is associated with each of the new or updated records.    One RegisterInstance request must complete before you can submit another request and specify the same service ID and instance ID.  For more information, see CreateService. When Cloud Map receives a DNS query for the specified DNS name, it returns the applicable value:    If the health check is healthy: returns all the records    If the health check is unhealthy: returns the applicable value for the last healthy instance    If you didn't specify a health check configuration: returns all the records   For the current quota on the number of instances that you can register using the same namespace and using the same service, see Cloud Map quotas in the Cloud Map Developer Guide.
    ///
    /// Parameters:
    ///   - attributes: A string map that contains the following information for the service that you specify in ServiceId:   The attributes that apply to the records that are defined in the service.    For each attribute, the applicable value.    Do not include sensitive information in the attributes if the namespace is discoverable by public DNS queries.  The following are the supported attribute keys.  AWS_ALIAS_DNS_NAME  If you want Cloud Map to create an Amazon Route 53 alias record that routes traffic to an Elastic Load Balancing load balancer, specify the DNS name that's associated with the load balancer. For information about how to get the DNS name, see "DNSName" in the topic AliasTarget in the Route 53 API Reference. Note the following:   The configuration for the service that's specified by ServiceId must include settings for an A record, an AAAA record, or both.   In the service that's specified by ServiceId, the value of RoutingPolicy must be WEIGHTED.   If the service that's specified by ServiceId includes HealthCheckConfig settings, Cloud Map will create the Route 53 health check, but it doesn't associate the health check with the alias record.   Cloud Map currently doesn't support creating alias records that route traffic to Amazon Web Services resources other than Elastic Load Balancing load balancers.   If you specify a value for AWS_ALIAS_DNS_NAME, don't specify values for any of the AWS_INSTANCE attributes.   The AWS_ALIAS_DNS_NAME is not supported in the GovCloud (US) Regions.    AWS_EC2_INSTANCE_ID   HTTP namespaces only. The Amazon EC2 instance ID for the instance. If the AWS_EC2_INSTANCE_ID attribute is specified, then the only other attribute that can be specified is AWS_INIT_HEALTH_STATUS. When the AWS_EC2_INSTANCE_ID attribute is specified, then the AWS_INSTANCE_IPV4 attribute will be filled out with the primary private IPv4 address.  AWS_INIT_HEALTH_STATUS  If the service configuration includes HealthCheckCustomConfig, you can optionally use AWS_INIT_HEALTH_STATUS to specify the initial status of the custom health check, HEALTHY or UNHEALTHY. If you don't specify a value for AWS_INIT_HEALTH_STATUS, the initial status is HEALTHY.  AWS_INSTANCE_CNAME  If the service configuration includes a CNAME record, the domain name that you want Route 53 to return in response to DNS queries (for example, example.com). This value is required if the service specified by ServiceId includes settings for an CNAME record.  AWS_INSTANCE_IPV4  If the service configuration includes an A record, the IPv4 address that you want Route 53 to return in response to DNS queries (for example, 192.0.2.44). This value is required if the service specified by ServiceId includes settings for an A record. If the service includes settings for an SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.  AWS_INSTANCE_IPV6  If the service configuration includes an AAAA record, the IPv6 address that you want Route 53 to return in response to DNS queries (for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345). This value is required if the service specified by ServiceId includes settings for an AAAA record. If the service includes settings for an SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.  AWS_INSTANCE_PORT  If the service includes an SRV record, the value that you want Route 53 to return for the port. If the service includes HealthCheckConfig, the port on the endpoint that you want Route 53 to send requests to.  This value is required if you specified settings for an SRV record or a Route 53 health check when you created the service.  Custom attributes  You can add up to 30 custom attributes. For each key-value pair, the maximum length of the attribute name is 255 characters, and the maximum length of the attribute value is 1,024 characters. The total size of all provided attributes (sum of all keys and values) must not exceed 5,000 characters.
    ///   - creatorRequestId: A unique string that identifies the request and that allows failed RegisterInstance requests to be retried without the risk of executing the operation twice. You must use a unique CreatorRequestId string every time you submit a RegisterInstance request if you're registering additional instances for the same namespace and service. CreatorRequestId can be any unique string (for example, a date/time stamp).
    ///   - instanceId: An identifier that you want to associate with the instance. Note the following:   If the service that's specified by ServiceId includes settings for an SRV record, the value of InstanceId is automatically included as part of the value for the SRV record. For more information, see DnsRecord > Type.   You can use this value to update an existing instance.   To register a new instance, you must specify a value that's unique among instances that you register by using the same service.    If you specify an existing InstanceId and ServiceId, Cloud Map updates the existing DNS records, if any. If there's also an existing health check, Cloud Map deletes the old health check and creates a new one.   The health check isn't deleted immediately, so it will still appear for a while if you submit a ListHealthChecks request, for example.     Do not include sensitive information in InstanceId if the namespace is discoverable by public DNS queries and any Type member of DnsRecord for the service contains SRV because the InstanceId is discoverable by public DNS queries.
    ///   - serviceId: The ID or Amazon Resource Name (ARN) of the service that you want to use for settings for the instance. For services created in a shared namespace, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.
    ///   - logger: Logger use during operation
    @inlinable
    public func registerInstance(
        attributes: [String: String],
        creatorRequestId: String? = RegisterInstanceRequest.idempotencyToken(),
        instanceId: String,
        serviceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> RegisterInstanceResponse {
        let input = RegisterInstanceRequest(
            attributes: attributes, 
            creatorRequestId: creatorRequestId, 
            instanceId: instanceId, 
            serviceId: serviceId
        )
        return try await self.registerInstance(input, logger: logger)
    }

    /// Adds one or more tags to the specified resource.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds one or more tags to the specified resource.
    ///
    /// Parameters:
    ///   - resourceARN: The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.
    ///   - tags: The tags to add to the specified resource. Specifying the tag key is required. You can set the value of a tag to an empty string, but you can't set the value of a tag to null.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceARN: String,
        tags: [Tag],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceARN: resourceARN, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes one or more tags from the specified resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes one or more tags from the specified resource.
    ///
    /// Parameters:
    ///   - resourceARN: The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.
    ///   - tagKeys: The tag keys to remove from the specified resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceARN: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceARN: resourceARN, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates an HTTP namespace.
    @Sendable
    @inlinable
    public func updateHttpNamespace(_ input: UpdateHttpNamespaceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateHttpNamespaceResponse {
        try await self.client.execute(
            operation: "UpdateHttpNamespace", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates an HTTP namespace.
    ///
    /// Parameters:
    ///   - id: The ID or Amazon Resource Name (ARN) of the namespace that you want to update.
    ///   - namespace: Updated properties for the the HTTP namespace.
    ///   - updaterRequestId: A unique string that identifies the request and that allows failed UpdateHttpNamespace requests to be retried without the risk of running the operation twice. UpdaterRequestId can be any unique string (for example, a date/timestamp).
    ///   - logger: Logger use during operation
    @inlinable
    public func updateHttpNamespace(
        id: String,
        namespace: HttpNamespaceChange,
        updaterRequestId: String? = UpdateHttpNamespaceRequest.idempotencyToken(),
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateHttpNamespaceResponse {
        let input = UpdateHttpNamespaceRequest(
            id: id, 
            namespace: namespace, 
            updaterRequestId: updaterRequestId
        )
        return try await self.updateHttpNamespace(input, logger: logger)
    }

    /// Submits a request to change the health status of a custom health check to healthy or unhealthy. You can use UpdateInstanceCustomHealthStatus to change the status only for custom health checks, which you define using HealthCheckCustomConfig when you create a service. You can't use it to change the status for Route 53 health checks, which you define using HealthCheckConfig. For more information, see HealthCheckCustomConfig.
    @Sendable
    @inlinable
    public func updateInstanceCustomHealthStatus(_ input: UpdateInstanceCustomHealthStatusRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "UpdateInstanceCustomHealthStatus", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Submits a request to change the health status of a custom health check to healthy or unhealthy. You can use UpdateInstanceCustomHealthStatus to change the status only for custom health checks, which you define using HealthCheckCustomConfig when you create a service. You can't use it to change the status for Route 53 health checks, which you define using HealthCheckConfig. For more information, see HealthCheckCustomConfig.
    ///
    /// Parameters:
    ///   - instanceId: The ID of the instance that you want to change the health status for.
    ///   - serviceId: The ID or Amazon Resource Name (ARN) of the service that includes the configuration for the custom health check that you want to change the status for. For services created in a shared namespace, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.
    ///   - status: The new status of the instance, HEALTHY or UNHEALTHY.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateInstanceCustomHealthStatus(
        instanceId: String,
        serviceId: String,
        status: CustomHealthStatus,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = UpdateInstanceCustomHealthStatusRequest(
            instanceId: instanceId, 
            serviceId: serviceId, 
            status: status
        )
        return try await self.updateInstanceCustomHealthStatus(input, logger: logger)
    }

    /// Updates a private DNS namespace.
    @Sendable
    @inlinable
    public func updatePrivateDnsNamespace(_ input: UpdatePrivateDnsNamespaceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdatePrivateDnsNamespaceResponse {
        try await self.client.execute(
            operation: "UpdatePrivateDnsNamespace", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a private DNS namespace.
    ///
    /// Parameters:
    ///   - id: The ID or Amazon Resource Name (ARN) of the namespace that you want to update.
    ///   - namespace: Updated properties for the private DNS namespace.
    ///   - updaterRequestId: A unique string that identifies the request and that allows failed UpdatePrivateDnsNamespace requests to be retried without the risk of running the operation twice. UpdaterRequestId can be any unique string (for example, a date/timestamp).
    ///   - logger: Logger use during operation
    @inlinable
    public func updatePrivateDnsNamespace(
        id: String,
        namespace: PrivateDnsNamespaceChange,
        updaterRequestId: String? = UpdatePrivateDnsNamespaceRequest.idempotencyToken(),
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdatePrivateDnsNamespaceResponse {
        let input = UpdatePrivateDnsNamespaceRequest(
            id: id, 
            namespace: namespace, 
            updaterRequestId: updaterRequestId
        )
        return try await self.updatePrivateDnsNamespace(input, logger: logger)
    }

    /// Updates a public DNS namespace.
    @Sendable
    @inlinable
    public func updatePublicDnsNamespace(_ input: UpdatePublicDnsNamespaceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdatePublicDnsNamespaceResponse {
        try await self.client.execute(
            operation: "UpdatePublicDnsNamespace", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a public DNS namespace.
    ///
    /// Parameters:
    ///   - id: The ID or Amazon Resource Name (ARN) of the namespace being updated.
    ///   - namespace: Updated properties for the public DNS namespace.
    ///   - updaterRequestId: A unique string that identifies the request and that allows failed UpdatePublicDnsNamespace requests to be retried without the risk of running the operation twice. UpdaterRequestId can be any unique string (for example, a date/timestamp).
    ///   - logger: Logger use during operation
    @inlinable
    public func updatePublicDnsNamespace(
        id: String,
        namespace: PublicDnsNamespaceChange,
        updaterRequestId: String? = UpdatePublicDnsNamespaceRequest.idempotencyToken(),
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdatePublicDnsNamespaceResponse {
        let input = UpdatePublicDnsNamespaceRequest(
            id: id, 
            namespace: namespace, 
            updaterRequestId: updaterRequestId
        )
        return try await self.updatePublicDnsNamespace(input, logger: logger)
    }

    /// Submits a request to perform the following operations:   Update the TTL setting for existing DnsRecords configurations   Add, update, or delete HealthCheckConfig for a specified service  You can't add, update, or delete a HealthCheckCustomConfig configuration.    For public and private DNS namespaces, note the following:   If you omit any existing DnsRecords or HealthCheckConfig configurations from an UpdateService request, the configurations are deleted from the service.   If you omit an existing HealthCheckCustomConfig configuration from an UpdateService request, the configuration isn't deleted from the service.    You can't call UpdateService and update settings in the following scenarios:   When the service is associated with an HTTP namespace   When the service is associated with a shared namespace and contains instances that were registered by Amazon Web Services accounts other than the account making the UpdateService call    When you update settings for a service, Cloud Map also updates the corresponding settings in all the records and health checks that were created by using the specified service.
    @Sendable
    @inlinable
    public func updateService(_ input: UpdateServiceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateServiceResponse {
        try await self.client.execute(
            operation: "UpdateService", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Submits a request to perform the following operations:   Update the TTL setting for existing DnsRecords configurations   Add, update, or delete HealthCheckConfig for a specified service  You can't add, update, or delete a HealthCheckCustomConfig configuration.    For public and private DNS namespaces, note the following:   If you omit any existing DnsRecords or HealthCheckConfig configurations from an UpdateService request, the configurations are deleted from the service.   If you omit an existing HealthCheckCustomConfig configuration from an UpdateService request, the configuration isn't deleted from the service.    You can't call UpdateService and update settings in the following scenarios:   When the service is associated with an HTTP namespace   When the service is associated with a shared namespace and contains instances that were registered by Amazon Web Services accounts other than the account making the UpdateService call    When you update settings for a service, Cloud Map also updates the corresponding settings in all the records and health checks that were created by using the specified service.
    ///
    /// Parameters:
    ///   - id: The ID or Amazon Resource Name (ARN) of the service that you want to update. If the namespace associated with the service is shared with your Amazon Web Services account, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide
    ///   - service: A complex type that contains the new settings for the service. You can specify a maximum of 30 attributes (key-value pairs).
    ///   - logger: Logger use during operation
    @inlinable
    public func updateService(
        id: String,
        service: ServiceChange,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateServiceResponse {
        let input = UpdateServiceRequest(
            id: id, 
            service: service
        )
        return try await self.updateService(input, logger: logger)
    }

    /// Submits a request to update a specified service to add service-level attributes.
    @Sendable
    @inlinable
    public func updateServiceAttributes(_ input: UpdateServiceAttributesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateServiceAttributesResponse {
        try await self.client.execute(
            operation: "UpdateServiceAttributes", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Submits a request to update a specified service to add service-level attributes.
    ///
    /// Parameters:
    ///   - attributes: A string map that contains attribute key-value pairs.
    ///   - serviceId: The ID or Amazon Resource Name (ARN) of the service that you want to update. For services created in a namespace shared with your Amazon Web Services account, specify the service ARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateServiceAttributes(
        attributes: [String: String],
        serviceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateServiceAttributesResponse {
        let input = UpdateServiceAttributesRequest(
            attributes: attributes, 
            serviceId: serviceId
        )
        return try await self.updateServiceAttributes(input, logger: logger)
    }
}

extension ServiceDiscovery {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: ServiceDiscovery, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension ServiceDiscovery {
    /// Return PaginatorSequence for operation ``getInstancesHealthStatus(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getInstancesHealthStatusPaginator(
        _ input: GetInstancesHealthStatusRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetInstancesHealthStatusRequest, GetInstancesHealthStatusResponse> {
        return .init(
            input: input,
            command: self.getInstancesHealthStatus,
            inputKey: \GetInstancesHealthStatusRequest.nextToken,
            outputKey: \GetInstancesHealthStatusResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getInstancesHealthStatus(_:logger:)``.
    ///
    /// - Parameters:
    ///   - instances: An array that contains the IDs of all the instances that you want to get the health status for. If you omit Instances, Cloud Map returns the health status for all the instances that are associated with the specified service.  To get the IDs for the instances that you've registered by using a specified service, submit a ListInstances request.
    ///   - maxResults: The maximum number of instances that you want Cloud Map to return in the response to a GetInstancesHealthStatus request. If you don't specify a value for MaxResults, Cloud Map returns up to 100 instances.
    ///   - serviceId: The ID or Amazon Resource Name (ARN) of the service that the instance is associated with. For services created in a shared namespace, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.
    ///   - logger: Logger used for logging
    @inlinable
    public func getInstancesHealthStatusPaginator(
        instances: [String]? = nil,
        maxResults: Int? = nil,
        serviceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetInstancesHealthStatusRequest, GetInstancesHealthStatusResponse> {
        let input = GetInstancesHealthStatusRequest(
            instances: instances, 
            maxResults: maxResults, 
            serviceId: serviceId
        )
        return self.getInstancesHealthStatusPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listInstances(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listInstancesPaginator(
        _ input: ListInstancesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListInstancesRequest, ListInstancesResponse> {
        return .init(
            input: input,
            command: self.listInstances,
            inputKey: \ListInstancesRequest.nextToken,
            outputKey: \ListInstancesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listInstances(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of instances that you want Cloud Map to return in the response to a ListInstances request. If you don't specify a value for MaxResults, Cloud Map returns up to 100 instances.
    ///   - serviceId: The ID or Amazon Resource Name (ARN) of the service that you want to list instances for. For services created in a shared namespace, specify the service ARN. For more information about shared namespaces, see Cross-account Cloud Map namespace sharing in the Cloud Map Developer Guide.
    ///   - logger: Logger used for logging
    @inlinable
    public func listInstancesPaginator(
        maxResults: Int? = nil,
        serviceId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListInstancesRequest, ListInstancesResponse> {
        let input = ListInstancesRequest(
            maxResults: maxResults, 
            serviceId: serviceId
        )
        return self.listInstancesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listNamespaces(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listNamespacesPaginator(
        _ input: ListNamespacesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListNamespacesRequest, ListNamespacesResponse> {
        return .init(
            input: input,
            command: self.listNamespaces,
            inputKey: \ListNamespacesRequest.nextToken,
            outputKey: \ListNamespacesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listNamespaces(_:logger:)``.
    ///
    /// - Parameters:
    ///   - filters: A complex type that contains specifications for the namespaces that you want to list. If you specify more than one filter, a namespace must match all filters to be returned by ListNamespaces.
    ///   - maxResults: The maximum number of namespaces that you want Cloud Map to return in the response to a ListNamespaces request. If you don't specify a value for MaxResults, Cloud Map returns up to 100 namespaces.
    ///   - logger: Logger used for logging
    @inlinable
    public func listNamespacesPaginator(
        filters: [NamespaceFilter]? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListNamespacesRequest, ListNamespacesResponse> {
        let input = ListNamespacesRequest(
            filters: filters, 
            maxResults: maxResults
        )
        return self.listNamespacesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listOperations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listOperationsPaginator(
        _ input: ListOperationsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListOperationsRequest, ListOperationsResponse> {
        return .init(
            input: input,
            command: self.listOperations,
            inputKey: \ListOperationsRequest.nextToken,
            outputKey: \ListOperationsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listOperations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - filters: A complex type that contains specifications for the operations that you want to list, for example, operations that you started between a specified start date and end date. If you specify more than one filter, an operation must match all filters to be returned by ListOperations.
    ///   - maxResults: The maximum number of items that you want Cloud Map to return in the response to a ListOperations request. If you don't specify a value for MaxResults, Cloud Map returns up to 100 operations.
    ///   - logger: Logger used for logging
    @inlinable
    public func listOperationsPaginator(
        filters: [OperationFilter]? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListOperationsRequest, ListOperationsResponse> {
        let input = ListOperationsRequest(
            filters: filters, 
            maxResults: maxResults
        )
        return self.listOperationsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listServices(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listServicesPaginator(
        _ input: ListServicesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListServicesRequest, ListServicesResponse> {
        return .init(
            input: input,
            command: self.listServices,
            inputKey: \ListServicesRequest.nextToken,
            outputKey: \ListServicesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listServices(_:logger:)``.
    ///
    /// - Parameters:
    ///   - filters: A complex type that contains specifications for the namespaces that you want to list services for.  If you specify more than one filter, an operation must match all filters to be returned by ListServices.
    ///   - maxResults: The maximum number of services that you want Cloud Map to return in the response to a ListServices request. If you don't specify a value for MaxResults, Cloud Map returns up to 100 services.
    ///   - logger: Logger used for logging
    @inlinable
    public func listServicesPaginator(
        filters: [ServiceFilter]? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListServicesRequest, ListServicesResponse> {
        let input = ListServicesRequest(
            filters: filters, 
            maxResults: maxResults
        )
        return self.listServicesPaginator(input, logger: logger)
    }
}

extension ServiceDiscovery.GetInstancesHealthStatusRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ServiceDiscovery.GetInstancesHealthStatusRequest {
        return .init(
            instances: self.instances,
            maxResults: self.maxResults,
            nextToken: token,
            serviceId: self.serviceId
        )
    }
}

extension ServiceDiscovery.ListInstancesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ServiceDiscovery.ListInstancesRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            serviceId: self.serviceId
        )
    }
}

extension ServiceDiscovery.ListNamespacesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ServiceDiscovery.ListNamespacesRequest {
        return .init(
            filters: self.filters,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension ServiceDiscovery.ListOperationsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ServiceDiscovery.ListOperationsRequest {
        return .init(
            filters: self.filters,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension ServiceDiscovery.ListServicesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ServiceDiscovery.ListServicesRequest {
        return .init(
            filters: self.filters,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
